package view;

import java.awt.Color;
import java.awt.Graphics2D;

import model.components.ScreenComponent;
import model.components.StageComponent;
import model.xml.StageComponentEnum;

public class GraphicsPhases extends AbstractGraphics{
	
	public GraphicsPhases(Screen screen) {
		super(screen);
		
	}

	@Override
	public void paint(Graphics2D g) {
	
		g.setColor(Color.black);
		
	}
	
	public void paintStageComponent(Graphics2D g, StageComponent component) {
		
		g.drawImage(getSpriteCache().getSpriteInstance(StageComponentEnum.valueOf(component.getName()).getImageName()), component.getRegion().x, component.getRegion().y,component.getRegion().width, component.getRegion().height, screen);
	
	}

	public void paintScreenComponent(Graphics2D g, ScreenComponent component) {
		g.drawImage(getSpriteCache().getSpriteInstance(component.getComponent().getImageName()), component.getRegion().x, component.getRegion().y,component.getRegion().width, component.getRegion().height, screen);
		
	}
}


